angular.module("myApp")
.controller("ShopControllerChildren", ["$scope","ShopServiceChildren","$location","$anchorScroll", function($scope,ShopServiceChildren,$location,$anchorScroll){
	ShopServiceChildren.getData().success(function(res){
		$scope.items=res.data;
		$scope.arrs=res.hot_goods;
		$scope.func=function(e){
			var as=document.querySelectorAll(".shopChildren_nav_a");
			for(var i=0;i<as.length;i++){
				as[i].style.color="#000";
			}
			e.target.style.color="#3DC793";
		}
    })
    $scope.product=function(){
		$location.hash('name1');
		$anchorScroll();
	}
	 $scope.prod=function(){
		$location.hash('name2');
		$anchorScroll();
	}
	 $scope.pro=function(){
		$location.hash('name3');
		$anchorScroll();
	}
}])
//href="index.html#/shopChildren#name1"